From b474acb190e08cb9a137692c7ea29943268800dc Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 6 Jan 2005 16:24:17 +0000 Subject: [PATCH] Don't leak on replacement. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1017 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 11d3e8783..69f0d9370 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -658,7 +658,9 @@ gstrsub(const char *s, const char *search, const char *replace) char *o = xstrdup(s); while (strstr(o, search)) { + char *oo = o; o = strsub(o, search, replace); + xfree(oo); } return o; -- 2.30.2